//
//  DressCell.m
//  婚礼纪
//
//  Created by dllo on 15/5/12.
//  Copyright (c) 2015年 蓝鸥. All rights reserved.
//

#import "DressCell.h"

@implementation DressCell

- (void)dealloc
{
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell
{
    self.imageView1 = [[ImageView alloc] initWithFrame:CGRectMake(5, 5, 180, 250)];
    self.imageView1.userInteractionEnabled = YES;
    [self.contentView addSubview:_imageView1];
    [_imageView1 release];
    
    UITapGestureRecognizer * tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
    [self.imageView1 addGestureRecognizer:tap1];
    [tap1 release];
    
    self.imageView2 = [[ImageView alloc] initWithFrame:CGRectMake(190, 5, 180, 250)];
    self.imageView2.userInteractionEnabled = YES;
    [self.contentView addSubview:_imageView2];
    [_imageView2 release];
    
    UITapGestureRecognizer * tap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
    [self.imageView2 addGestureRecognizer:tap2];
    [tap2 release];
    
    self.price1 = [[UILabel alloc] initWithFrame:CGRectMake(10, 260, 100, 40)];
    [self.contentView addSubview:_price1];
    [_price1 release];
    
    self.price2 = [[UILabel alloc] initWithFrame:CGRectMake(190, 260, 100, 40)];
    [self.contentView addSubview:_price2];
    [_price2 release];
    
    self.like_count1 = [[UILabel alloc] initWithFrame:CGRectMake(125, 260, 60, 40)];
    [self.contentView addSubview:_like_count1];
    [_like_count1 release];
    
    self.like_count2 = [[UILabel alloc] initWithFrame:CGRectMake(305, 260, 60, 40)];
    [self.contentView addSubview:_like_count2];
    [_like_count2 release];
}

- (void)tapAction:(UITapGestureRecognizer *)tap
{
    ImageView * image = (ImageView *)tap.view;
    
    [self.delegate touchAction:image];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
